#ifndef _TESTCLASS_H_
#define _TESTCLASS_H_

#include "stdafx.h"
#include "Thread.h"
#include <iostream>

class TestClass
{
public:
	void Run( int i );
	bool IsThreadActive();

private:
	Lib::Thread<TestClass, int> m_thread;

	void DoWork( int i );
};

// ----------------------------------------
void TestClass::Run( int i )
{
	m_thread.Run(this, &TestClass::DoWork, i);
}

// ----------------------------------------
bool TestClass::IsThreadActive()
{
	return m_thread.IsThreadActive();
}

// ----------------------------------------
void TestClass::DoWork( int i )
{
	using namespace std;

	for (int c = 0; c < 100; ++c)
		cout << "Thread " << i << " is at " << c << endl;
}

#endif